﻿using Common.MQ;
using System;
using System.Collections.Generic;
using System.Text;

namespace Common.RabbitMQ
{
    /// <summary>
    /// rabbit提供者
    /// </summary>
    public class RabbitProvider : IMessageQueueProvider
    {
        private readonly RabbitBuilder rabbit;
        /// <summary>
        /// rabbit提供者
        /// </summary>
        /// <param name="builder"></param>
        public RabbitProvider(RabbitBuilder builder)
        {
            this.rabbit = builder;
        }
        /// <inheritdoc/>
        public IMQProducer Producer => rabbit.Producer;
        /// <inheritdoc/>
        public List<MQConsumerBase> Consumers => rabbit.Consumers;
        /// <inheritdoc/>
        public MessageQueueType QueueType => MessageQueueType.RabbitMQ;
    }
}
